import type { routerItem } from "@/common/interface";
import wrapper from "@/layout/wrapper.vue";

const staticRoutes: routerItem[] = [
  {
    path: "/",
    name: "控制台",
    component: wrapper,
    meta: {
      icon: "custom-icon-Home",
    },
    children: [
      {
        path: "/",
        name: "首页",
        lang: "menu.t1",
        component: () => import("@/views/index/home.vue"),
      },
      {
        path: "/config",
        name: "系统配置",
        lang: "menu.t6",
        component: () => import("@/views/config/index.vue"),
      },
      {
        path: "/pages",
        name: "菜单页面管理",
        component: () => import("@/views/pages/list.vue"),
      },
      {
        path: "/form_list",
        name: "表单管理",
        component: () => import("@/views/index/form_list.vue"),
      },
      {
        path: "/img",
        name: "图片管理",
        component: () => import("@/views/index/img.vue"),
      },
    ],
  },
  {
    path: "/goods",
    name: "商品",
    lang: "menu.t2",
    component: wrapper,
    redirect: "/goods/list",
    meta: {
      icon: "custom-icon-Bag1",
    },
    children: [
      {
        path: "/goods/list",
        name: "商品列表",
        lang: "menu.t3",
        component: () => import("@/views/goods/list.vue"),
      },
      {
        path: "/goods/type",
        name: "商品类型",
        lang: "menu.t4",
        component: () => import("@/views/goods/type.vue"),
      },
      {
        path: "/goods/edit",
        name: "添加/编辑商品",
        component: () => import("@/views/goods/edit.vue"),
      },
    ],
  },
  {
    path: "/news",
    name: "资讯",
    component: wrapper,
    meta: {
      icon: "custom-icon-Document1",
    },
    redirect: "/news/list",
    children: [
      {
        path: "/news/list",
        name: "资讯列表",
        component: () => import("@/views/news/list.vue"),
      },
      {
        path: "/news/type",
        name: "资讯分类",
        component: () => import("@/views/news/type.vue"),
      },
      {
        path: "/news/edit",
        name: "添加/编辑资讯",
        component: () => import("@/views/news/edit.vue"),
      },
    ],
  }
];
export default staticRoutes;
